package com.sunwayworld.basemodule.common.editrecord.resource.impl;

import com.sunwayworld.basemodule.common.editrecord.bean.LimsEditRecordBean;
import com.sunwayworld.basemodule.common.editrecord.resource.LimsEditRecordResource;
import com.sunwayworld.basemodule.common.editrecord.service.LimsEditRecordService;
import com.sunwayworld.framework.data.page.Page;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@LogModule("审计跟踪")
@RestController
@GikamBean
public class LimsEditRecordResourceImpl implements LimsEditRecordResource {

    @Autowired
    private LimsEditRecordService limsEditRecordService;

    @Override
    public LimsEditRecordService getService() {
        return limsEditRecordService;
    }

    @Log(value = "新增审计跟踪", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Override
    public Page<LimsEditRecordBean> selectLimsEditRecordsByOrderTaskId(Long orderTaskId, RestJsonWrapperBean wrapperBean) {
        return getService().selectLimsEditRecordsByOrderTaskId(orderTaskId, wrapperBean);
    }
}
